{extend name="./public/base"/}
{block name="alt"}admin上传视频列表管理{/block}
{block name="alter"}视频详情{/block}
{block name="title"}BangBang修改视频详情{/block}
{block name="main"}
<div class="row">
                    <div class="col-11">
                        <div class="card">
                            <div class="card-block">
                                <div class="card-body">
                                	<h3>基本信息</h3>
                                	{volist name="videoDetails" id="us"}
                                	<div class="row">
                                	<div class="col-sm-3 text-center">
                                		<br>
                                		<br>
                                		<img src="__STATIC__/videopic/{$us.pic}" alt="" width="150px" height="150px" style="border-radius: 50%;"><br>
                                    <button type="button" class="btn btn-success" style="margin-top: 100px;"><a href="{:url('Video/index')}" style="color:white;">返回视频列表</a></button>
                                	</div>
                                        <div class="">
                                           <table class="table">
  <caption></caption>
    <tr>
      <td><p>视频名</p></td>
      <td><p class="text-left">{$us.videoname}</p></td>
    </tr>
    <tr>
      <td><p>视频类型</p></td>
      <td><p class="text-left">{$us.typename}</p></td>
    </tr>
    <tr>
      <td><p>点击量</p></td>
      <td><p class="text-left">{$us.hittimes}</p></td>
    </tr>
    <tr>
      <td><p>视频上传时间</p></td>
      <td><p class="text-left">{$us.uploaddate}</p></td>
    </tr>
    <tr>
      <td><p>所属知识体系</p></td>
      <td><p class="text-left">{$us.kname}--{$us.kbname}</p></td>
    </tr>

    <tr>
      <td><p>所属职业方向</p></td>
      <td><p class="text-left">{$us.oname}--{if condition="$us.olevel==1"}入门
      {elseif condition="$us.olevel==2"/}基础
      {elseif condition="$us.olevel==3"/}初级工程师
      {else/}中级工程师
      {/if}</p></td>
    </tr>


    <tr>
      <td><p>上传人</p></td>
      <td><p class="text-left">admin</p></td>
    </tr>
    <tr>
      <td><p>视频简介</p></td>
      <td><p class="text-left">{$us.intro}</p></td>
    </tr>
</table>
<button type="button" class="btn btn-success" style="margin-left: 15%;"><a href="{:url('update',['vid'=>$us.vid])}" style="color: white;"><i class="icon-pencil"></i>修改视频信息</a></button>

</div>
</div>
                                          
                                       
                                        {/volist}
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
<div class="row">
                    <div class="col-11">
                        <div class="card">
                            <div class="card-block">
                                <div class="card-body">
                                	<h3>子视频目录</h3>

<!-- 按钮触发模态框 -->
<button class="btn btn-success btn-min" data-toggle="modal" data-target="#myModal" style="float: right;margin-top: -50px;"><i class="icon-plus"></i></button>


<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h4 class="modal-title" id="myModalLabel">添加新的子视频</h4>
            </div>
            <div class="modal-body">
                <form class="form-horizontal" role="form" action="{:url('addvideochild')}" method="post" enctype="multipart/form-data">
                	{volist name="videoDetails" id="us"}
                	<input type="hidden" name="vid" value="{$us.vid}" >
                	{/volist}
<div class="form-group">
    <label for="inputPassword" class="col-sm-4 control-label">子视频标题</label>
    <div class="col-sm-10">
      <input type="text" name="cvtitle" class="form-control" id="inputPassword" required>
    </div>
  </div>
  
  <div class="form-group">
    <label for="inputPassword" class="col-sm-4 control-label">视频文件</label>
    <div class="col-sm-10">
      <input type="file" name="cvname" class="form-control" id="inputPassword" required>
      <p>请上传文件格式为MP4的文件</p>
      <!-- <p>并在上传视频前写好命名</p> -->
    </div>
  </div>
  <!-- <div class="form-group">
    <label for="inputPassword" class="col-sm-4 control-label">视频简介</label>
    <div class="col-sm-10">
      <input type="text" name="sshcredit" class="form-control" id="inputPassword" required>
       <textarea class="form-control" name="intro" rows="3" required></textarea>
    </div>
  </div> -->
 
  <button type="submit" class="btn btn-primary">提交</button>
</form>
            </div>
           
        </div><!-- /.modal-content -->
    </div><!-- /.modal-dialog -->
</div>
<!-- /.modal -->
                                	
                                	<table class="table table-striped  mt-3">
                                            {volist name="videochilds" id="cv" key="k"}
                                                <tr>
                                                   
                                                    <th scope="col"><p style="font-size: 20px;margin-top: auto;margin-bottom: auto;">{$k+($page-1)*10}.{$cv.cvtitle} <a href="{:url('delate',['vid'=>$cv.vid,'cvid'=>$cv.cvid])}" style="float: right;margin-right: 20px;" onclick="return confirm('真的要删除该视频么？')"><i class="icon-trash" ></i></a></p>
                                                    </th>
													
                                                </tr>
                                           		<tr>
                                           			<td scope="col"><a href="{:url('videochild',['cvid'=>$cv.cvid])}"><i class="icon-play"></i>&nbsp;&nbsp;&nbsp;&nbsp;{$cv.cvtitle}.mp4</a></td>
                                           		</tr>

                                            {/volist}
                                      
                                        </table>
                                         {$videochilds->render()}
                                </div>
                            </div>
                        </div>
                    </div>
                </div>


{/block}